import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';

const resources = {
  en: {
    translation: {
      "enter3D": "Enter 3D Gallery",
      "themeSwitch": "Theme Switch",
      "language": "中文"
    }
  },
  zh: {
    translation: {
      "enter3D": "进入3D展馆",
      "themeSwitch": "主题切换",
      "language": "English"
    }
  }
};

i18n
  .use(LanguageDetector)
  .use(initReactI18next)
  .init({
    resources,
    fallbackLng: 'zh',
    interpolation: {
      escapeValue: false
    }
  });

export default i18n; 